package com.weixin.controller;

import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.jfinal.core.Controller;
import com.weixin.dao.Store;

public class StoreController extends Controller{
	public Store dao = new Store();
	
	/**
	 * 通过选择的城市id 选择门店 
	 */
	public void selectAll(){
		String city_id = getPara("city_id");
		List<Store> stores = dao.selectAll(city_id);
		JSONObject json = new JSONObject();
		if (stores.size() == 0) {
			json.put("code", 0);
		}else{
			json.put("code", "1");
			json.put("data", stores);
		}
		renderJson(json);
	}
}
